lines()
function lines(){
    var lineChart=echarts.init($('#line')[0]);
    var option = {
    color:["#4788de","#ff944c"],
    tooltip: {
        trigger: 'axis'
    },
    legend: {
        data:['2015','2016']
    },
    xAxis:  {
        type: 'category',
        boundaryGap: false,
        data: ['1','2','3','4','5','6','7']
    },
    yAxis: {
        type: 'value',
        axisLabel: {
            formatter: '{value}'
        }
    },
    series: [
        {
            name:'2015',
            type:'line',
            data:[11, 11, 15, 13, 12, 13, 10],
            markPoint: {
                data: [
                    {type: 'max', name: '最大值'},
                    {type: 'min', name: '最小值'}
                ]
            },
            markLine: {
                data: [
                    {type: 'average', name: '平均值'}
                ]
            }
        },
        {
            name:'2016',
            type:'line',
            data:[1, -2, 2, 5, 3, 2, 0],
            markPoint: {
                data: [
                    {name: '周最低', value: -2, xAxis: 1, yAxis: -1.5}
                ]
            },
            markLine: {
                data: [
                    {type: 'average', name: '平均值'},
                    [{
                        symbol: 'none',
                        x: '90%',
                        yAxis: 'max'
                    }, {
                        symbol: 'circle',
                        label: {
                            normal: {
                                position: 'start',
                                formatter: '最大值'
                            }
                        },
                        type: 'max',
                        name: '最高点'
                    }]
                ]
            }
        }
    ]
};

lineChart.setOption(option)
}



//水情；雨情点击状态

$('.legend i').eq(0).click(function(){
    $(this).css("background-position","-78px 0");
    $('.legend i:eq(1)').css("background-position","-182px 0");
    $('#left .sq').css('display', 'block');
    $('#left .yq').css('display', 'none');
});
$('.legend i').eq(1).click(function(){
    $(this).css("background-position","-234px 0");
    $('.legend i:eq(0)').css("background-position","-130px 0");
    $('#left .sq').css('display', 'none');
    $('#left .yq').css('display', 'block');
})